package testing_package;

public class Pushing implements Runnable {

    private CommonResource commonResource;

    public Pushing(CommonResource commonResource) {
        this.commonResource = commonResource;
    }

    public void run() {
        for (int i = 0; i < 1000; i++) {
            commonResource.push(i + " u");

            try {
                Thread.sleep(50);
            } catch (Exception e) {
            }
        }
    }
}